Ranks and Determinants The Rank of a Matrix The rank of an n × p n \times p n × p matrix A A A , denoted by rank ( A ) \text{rank}(A) rank ( A ) , is the largest number of columns of A A A , which are not linearly dependent (i.e. the number of linearly independent columns).
Details Vectors a 1 , a 2 , … , a n a_1, a_2, \ldots, a_n a 1 , a 2 , … , a n are said to be linearly dependent if there exist constants k 1 , … , k n k_1, \ldots, k_n k 1 , … , k n that are not all zero, such that
k 1 a 1 + k 2 a 2 + … + k n a n = 0 k_1 a_1 + k_2 a_2 + \ldots + k_n a_n = 0 k 1 a 1 + k 2 a 2 + … + k n a n = 0
Note that if such constants exist, then we can write one of the a a a 's as a linear combination of the rest, e.g. if k 1 ≠ 0 k_1 \neq 0 k 1 = 0 then
a 1 = c 1 = − k 2 k 1 a 2 − … − k 2 k 1 a n a_1=\mathbf{c_1} = -\displaystyle\frac{k_2}{k_1} a_2 - \ldots - \displaystyle\frac{k_2}{k_1} a_n a 1 = c 1 = − k 1 k 2 a 2 − … − k 1 k 2 a n
It can be shown that the rank of A A A , is the same as the rank of A ′ A' A ′
i.e. the maximum number of linearly independent rows of A A A .
Note that if rank ( A ) = p \text{rank}(A) = p rank ( A ) = p , then the columns are linearly independent.
Examples If
A = [ 1 0 0 1 ] A = \left[ \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right] A = [ 1 0 0 1 ] then rank ( A ) \text{rank}(A) rank ( A ) = 2, since
k 1 ( 1 0 ) + k 2 ( 0 1 ) = ( 0 0 ) k_1 \left( \begin{array}{cc} 1 \\ 0 \end{array} \right) + k_2 \left( \begin{array}{cc} 0 \\ 1 \end{array} \right) = \left( \begin{array}{cc} 0 \\ 0 \end{array} \right) k 1 ( 1 0 ) + k 2 ( 0 1 ) = ( 0 0 ) if and only if
( k 1 k 2 ) = ( 0 0 ) \left( \begin{array}{cc} k_1 \\ k_2 \end{array} \right) = \left( \begin{array}{cc} 0 \\ 0 \end{array} \right) ( k 1 k 2 ) = ( 0 0 ) so the columns are linearly independent.
If
A = [ 1 0 1 0 1 1 0 0 0 ] A = \left[ \begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{array} \right] A = ⎣ ⎡ 1 0 0 0 1 0 1 1 0 ⎦ ⎤ then rank ( A ) \text{rank}(A) rank ( A ) = 2.
If
A = [ 1 1 1 0 1 0 0 1 0 ] A = \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{array} \right] A = ⎣ ⎡ 1 0 0 1 1 1 1 0 0 ⎦ ⎤ then rank ( A ) \text{rank}(A) rank ( A ) = 2. since
1 ( 1 0 0 ) + 0 ( 0 1 1 ) + ( − 1 ) ( 1 0 0 ) = 0 1 \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) + 0 \left( \begin{array}{ccc} 0 \\ 1 \\ 1 \end{array} \right) + (-1) \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) = 0 1 ⎝ ⎛ 1 0 0 ⎠ ⎞ + 0 ⎝ ⎛ 0 1 1 ⎠ ⎞ + ( − 1 ) ⎝ ⎛ 1 0 0 ⎠ ⎞ = 0 (and hence the rank cannot be more than 2) but
k 1 ( 1 0 0 ) + k 2 ( 0 1 1 ) k_1 \left( \begin{array}{ccc} 1 \\ 0 \\ 0 \end{array} \right) + k_2 \left( \begin{array}{ccc} 0 \\ 1 \\ 1 \end{array} \right) k 1 ⎝ ⎛ 1 0 0 ⎠ ⎞ + k 2 ⎝ ⎛ 0 1 1 ⎠ ⎞ if and only if k 1 = k 2 = 0 k_1=k_2=0 k 1 = k 2 = 0 (and hence the rank must be at least 2).
The Determinant Recall that for a 2 × 2 2 \times 2 2 × 2 matrix,
A = [ a b c d ] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} A = [ a c b d ] the inverse of A A A is
A − 1 = 1 a d − b c [ 2 3 3 1 ] A^{-1} = \displaystyle\frac{1}{ad-bc} \begin{bmatrix} 2 & 3 \\ 3 & 1 \end{bmatrix} A − 1 = a d − b c 1 [ 2 3 3 1 ] Details The number a d − b c ad-bc a d − b c is called the determinant of the 2 × 2 2 \times 2 2 × 2 matrix A A A .
Now suppose A A A is an n × n n \times n n × n matrix.
An elementary product from the matrix is a product of n n n terms based on taking exactly one term from each column of row x x x .
Each such term can be written in the form a 1 j 1 ⋅ a 2 j 2 ⋅ a 3 j 3 ⋅ … ⋅ a n j n a_{1j_1} \cdot a_{2j_2} \cdot a_{3j_3} \cdot \ldots \cdot a_{nj_n} a 1 j 1 ⋅ a 2 j 2 ⋅ a 3 j 3 ⋅ … ⋅ a n j n where j 1 , … , j n j_1, \ldots, j_n j 1 , … , j n is a permutation of the integers 1 , 2 , … , n 1,2, \ldots, n 1 , 2 , … , n .
Each permutation σ \sigma σ of the integers 1 , 2 , … , n 1,2,\ldots,n 1 , 2 , … , n can be performed by repeatedly interchanging two numbers.
A signed elementary product is an elementary product with a positive sign if the number of interchanges in the permutation is even but negative otherwise.
The determinant of A A A , det ( A ) \det(A) det ( A ) or ∣ A ∣ \vert A \vert ∣ A ∣ , is the sum of all signed elementary products.
Examples A = [ a 11 a 12 a 21 a 22 ] A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} A = [ a 11 a 21 a 12 a 22 ] then
∣ A ∣ = a 1 1 ‾ a 2 2 ‾ − a 1 2 ‾ a 2 1 ‾ \vert A \vert = a_{1\underline{1}} a_{2\underline{2}} - a_{1\underline{2}}a_{2\underline{1}} ∣ A ∣ = a 1 1 a 2 2 − a 1 2 a 2 1 .
If
A = [ a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 ] A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix} A = ⎣ ⎡ a 11 a 21 a 31 a 12 a 22 a 32 a 13 a 23 a 33 ⎦ ⎤ Then ∣ A ∣ \vert A \vert ∣ A ∣
= a 11 a 22 a 33 a_{11} a_{22} a_{33} a 11 a 22 a 33 This is the identity permutation and has positive sign
− a 11 a 23 a 32 -a_{11} a_{23} a_{32} − a 11 a 23 a 32 This is the permutation that only interchanges 2 2 2 and 3 3 3
− a 12 a 21 a 33 -a_{12} a_{21} a_{33} − a 12 a 21 a 33 Only one interchange
+ a 12 a 23 a 31 +a_{12} a_{23} a_{31} + a 12 a 23 a 31 Two interchanges
+ a 13 a 21 a 32 +a_{13} a_{21} a_{32} + a 13 a 21 a 32 Two interchanges
− a 13 a 22 a 31 -a_{13} a_{22} a_{31} − a 13 a 22 a 31 Three interchanges
A = [ 1 1 1 0 ] A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix} A = [ 1 1 1 0 ] ∣ A ∣ = − 1 \vert A \vert = -1 ∣ A ∣ = − 1
A = [ 1 0 0 0 2 0 0 0 3 ] A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{bmatrix} A = ⎣ ⎡ 1 0 0 0 2 0 0 0 3 ⎦ ⎤ ∣ A ∣ = 1 ⋅ 2 ⋅ 3 = 6 \vert A \vert = 1 \cdot 2 \cdot 3 = 6 ∣ A ∣ = 1 ⋅ 2 ⋅ 3 = 6
A = [ 1 0 0 0 2 0 0 3 0 ] A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 3 & 0 \end{bmatrix} A = ⎣ ⎡ 1 0 0 0 2 3 0 0 0 ⎦ ⎤ ∣ A ∣ = 0 \vert A \vert = 0 ∣ A ∣ = 0
A = [ 1 0 0 0 0 2 0 3 0 ] A = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 2 \\ 0 & 3 & 0 \end{bmatrix} A = ⎣ ⎡ 1 0 0 0 0 3 0 2 0 ⎦ ⎤ ∣ A ∣ = − 6 \vert A \vert = -6 ∣ A ∣ = − 6
A = [ 2 1 2 1 ] A = \begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix} A = [ 2 2 1 1 ] ∣ A ∣ = 0 \vert A \vert = 0 ∣ A ∣ = 0
A = [ 1 0 1 0 1 1 1 1 2 ] A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 2 \end{bmatrix} A = ⎣ ⎡ 1 0 1 0 1 1 1 1 2 ⎦ ⎤ ∣ A ∣ = 0 \vert A \vert = 0 ∣ A ∣ = 0
Ranks, Inverses and Determinants The following statements are true for an n × n n\times n n × n matrix A A A :
Details Suppose A A A is an n × n n\times n n × n matrix.
Then the following are truths: